<?php

// 登出
// DELETE member.logout

namespace app\api\resource\member;
// use think\Session;
// use think\Cookie;
use app\common\logic\Logout as LogoutLogic;

class Logout
{
    // 方法
    public $_method = ['DELETE'];
    // 前置
    public $_pre    = [];
    // 描述
    public $_description = '登出';
    // 参数
    public $_param  = [
    ];
    // 返回
    public $_return = [
        204 => '登出成功',
    ];

    public function run(&$request)
    {
        // 登出处理
        LogoutLogic::run();

        // 清除Session
        // Session::delete('member');

        // 写入Cookie
        // Cookie::delete('memberId');
        // Cookie::delete('memberRole');
        // Cookie::delete('memberCert');

        return [204,''];
    }
}